package com.zx.task.manager.dao;

import com.zx.task.manager.model.TaskOperations;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TaskOperationsMapper {
    int deleteByPrimaryKey(@Param("id") String id);

    int insert(TaskOperations row);

    int insertSelective(TaskOperations row);

    TaskOperations selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(TaskOperations row);

    int updateByPrimaryKeyWithBLOBs(TaskOperations row);

    int updateByPrimaryKey(TaskOperations row);

    int deleteByTaskId(@Param("taskId") String taskId);

    List<TaskOperations> getTaskOperationsListByTaskId(String taskId);

    Long countTaskOperations(@Param("taskId") String taskId,
                             @Param("operationType") Integer operationType,
                             @Param("operatorName") String operatorName);

    List<TaskOperations> getTaskOperationsListByPage(@Param("taskId") String taskId,
                                                     @Param("operationType") Integer operationType,
                                                     @Param("operatorName") String operatorName,
                                                     @Param("pageNum") Long pageNum,
                                                     @Param("pageSize") Long pageSize);

}